package com.zhang.authoritycenter.common.model.dto.authority;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.zhang.sharding.model.KingHoodDefaultSort;
import com.zhang.sharding.model.KingPageReqDTO;
import lombok.Data;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * description
 *
 * @author zhangFanJun
 * @date 2023-12-18 19:50
 **/
@Data
public class RoleQueryPageReqDTO extends KingPageReqDTO implements KingHoodDefaultSort, Serializable {

    public static final String DEFAULT_COLUMN = "createTime";
    public static final String DEFAULT_Tail = "id";

    @Override
    public List<OrderItem> getDefaultSort() {
        OrderItem one = OrderItem.asc(DEFAULT_COLUMN);
        return Collections.singletonList(one);
    }

    @Override
    public List<OrderItem> getTailSort() {
        OrderItem one = OrderItem.desc(DEFAULT_Tail);
        return Collections.singletonList(one);
    }

    /**
     * 角色code
     */
    private String code;

    /**
     * 角色名
     */
    private String name;


}
